package com.welsy.authoring.control
{
	import com.adobe.cairngorm.control.FrontController;
	import com.welsy.authoring.command.*	
	import com.welsy.authoring.event.*;
		
	/**
	  * The event controller for the course part
	  * @author Welsy.org
	  * @version	$Revision: 1.1 $
	  */
	public class CourseController extends FrontController
	{
		/**
		  * Init the controller
		  * Call the handler registration function
		  */
		public function CourseController()
		{
			initialiseCommands();
		}
		
		/**
		  * Register the event handlers to the Cairngorm architecture
		  */
		public function initialiseCommands() : void
		{
			addCommand( GetCoursesEvent.EVENT_GET_COURSES, GetCoursesCommand );			
			addCommand( GetCourseEvent.EVENT_GET_COURSE, GetCourseCommand );
			addCommand( AddCourseEvent.EVENT_ADD_COURSE, AddCourseCommand );
			addCommand( RemoveCourseEvent.EVENT_REMOVE_COURSE, RemoveCourseCommand );
			addCommand( PublishCourseEvent.EVENT_PUBLISH_COURSE, PublishCourseCommand );
			addCommand( GetCoursesPublishEvent.EVENT_GET_COURSES_PUBLISH, GetCoursesPublishCommand );	
			addCommand( GetTestEvent.EVENT_GET_TEST, GetTestCommand );
			addCommand( hasIteraEvent.EVENT_HAS_ITERA, hasIteraCommand );
		}	
	}
	
	}